package entity

import "gorm.io/gorm"

// Note 任务模型
type Note struct {
	gorm.Model
	Uid       uint   `gorm:"not null"`
	Title     string `gorm:"index;not null"`
	Status    int    `gorm:"default:0"`
	Content   string `gorm:"type:longtext"`
	StartTime int64
	EndTime   int64 `gorm:"default:0"`
}

// RecordViews 从redis中获取浏览笔记的数据,
func (task *Note) RecordViews() (uint64, error) {

	return 120, nil
}

// AddViews 向redis中存储浏览笔记的数据
func (task *Note) AddViews() error {

	return nil
}
